import axios from '@/util/request'

export const register = (user) =>{
    return axios({
        url:'/users/register',
        method:'post',
        data:user
    })
}
export const login = (username,password) =>{
    return axios({
        url:'/users/login',
        method:'get',
        params: { username, password } // GET请求用params传参
    })
}
export const findById = (uid) =>{
    return axios({
        url:'/users/id',
        method:'get',
        params: { uid } // GET请求用params传参
    })
}
export const Edit = (user) =>{
    return axios({
        url:'/users/edit',
        method:'post',
       data: user // GET请求用params传参
    })
}